package com.xukai.springboot.controller.question;


import com.xukai.springboot.entity.question.t_q_type;
import com.xukai.springboot.entity.request.question.DelQuestionTypeRequest;
import com.xukai.springboot.entity.response.ResponseBase;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(basePath = "api/question", description = "问题类型管理")
@RestController
@RequestMapping("api/question/*")
public class QuestionTypeController {

    /**
     * 日志
     */
    private final Logger logger = LoggerFactory.getLogger(QuestionTypeController.class);

    /**
     * 获取问题类型列表
     */
    @ApiOperation(value = "获取问题类型列表", notes = "获取问题类型列表")
    @ApiImplicitParams({

    })
    @GetMapping("GetQuertionTypes")
    public ResponseBase<List<t_q_type>> GetQuertionTypes() {
        ResponseBase<List<t_q_type>> result = new ResponseBase<>();
        try {
        } catch (Exception e) {
            logger.error("获取患者列表", e);
            result.setStatue(0);
        }
        return result;
    }

    /**
     * 获取问题类型详细信息
     */
    @ApiOperation(value = "获取问题类型详细信息", notes = "获取问题类型详细信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "TypeID", value = "问题类型ID", required = true, dataType = "int", example = "0",defaultValue ="0" , paramType = "query")
    })
    @GetMapping("GetQuestion")
    public ResponseBase<t_q_type> GetQuestion(@RequestParam int TypeID) {
        ResponseBase<t_q_type> result = new ResponseBase<>();
        try {
        } catch (Exception e) {
            logger.error("获取问题类型详细信息", e);
            result.setStatue(0);
        }
        return result;
    }

    /**
     * 新建问题类型
     */
    @ApiOperation(value = "新建问题类型", notes = "新建问题类型")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Param", value = "问题类型数据", required = true, dataType = "t_q_type", paramType = "query")
    })
    @PostMapping("CreateQuestionType")
    public ResponseBase<t_q_type> CreateQuestionType(@RequestParam t_q_type Param) {
        ResponseBase<t_q_type> result = new ResponseBase<>();
        try {
        } catch (Exception e) {
            logger.error("获取问题类型详细信息", e);
            result.setStatue(0);
        }
        return result;
    }

    /**
     * 编辑问题类型信息
     */
    @ApiOperation(value = "编辑问题类型信息", notes = "编辑问题类型信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Param", value = "问题类型数据", required = true, dataType = "t_q_type", paramType = "query")
    })
    @PostMapping("EditQuestionType")
    public ResponseBase EditQuestionType(@RequestParam t_q_type Param) {
        ResponseBase result = new ResponseBase();
        try {
        } catch (Exception e) {
            logger.error("编辑问题类型信息", e);
            result.setStatue(0);
        }
        return result;
    }

    /**
     * 删除问题类型
     */
    @ApiOperation(value = "删除问题类型", notes = "删除问题类型")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Param", value = "删除问题类型参数", required = true, dataType = "DelQuestionTypeRequest", paramType = "query")
    })
    @PostMapping("DelQuestionType")
    public ResponseBase DelQuestionType(@RequestParam DelQuestionTypeRequest Param) {
        ResponseBase result = new ResponseBase();
        try {
        } catch (Exception e) {
            logger.error("删除问题类型", e);
            result.setStatue(0);
        }
        return result;
    }
}
